diff options
| author | Dax Raad <[email protected]> | 2025-09-02 23:30:26 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-09-02 23:30:48 -0400 |
| commit | 1c31c2dd977d6e1c3a8e2e33cb6d4717b7897e7a (patch) | |
| tree | 0fef7df3b9b5d540acde4a2c3b2f031972b846a9 /cloud/app/src/routes/docs/[...path].ts | |
| parent | c1d754bec9f54836f66181dd37d279f0ffe2e6e5 (diff) | |
| download | opencode-1c31c2dd977d6e1c3a8e2e33cb6d4717b7897e7a.tar.gz opencode-1c31c2dd977d6e1c3a8e2e33cb6d4717b7897e7a.zip | |
wip: zen
Diffstat (limited to 'cloud/app/src/routes/docs/[...path].ts')
| -rw-r--r-- | cloud/app/src/routes/docs/[...path].ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cloud/app/src/routes/docs/[...path].ts b/cloud/app/src/routes/docs/[...path].ts new file mode 100644 index 000000000..f98223937 --- /dev/null +++ b/cloud/app/src/routes/docs/[...path].ts @@ -0,0 +1,20 @@ +import type { APIEvent } from "@solidjs/start/server" + +async function handler(evt: APIEvent) { + const req = evt.request.clone() + const url = new URL(req.url) + const targetUrl = `https://dev.opencode.ai${url.pathname}${url.search}` + const response = await fetch(targetUrl, { + method: req.method, + headers: req.headers, + body: req.body, + }) + return response +} + +export const GET = handler +export const POST = handler +export const PUT = handler +export const DELETE = handler +export const OPTIONS = handler +export const PATCH = handler |
